<?php
$contest = $this->contest;
/*@var $contest Core_Model_Contest*/
?>
<div class="container-report">
	<h1><?php echo $this->escape($contest->getTitle())?></h1>
	<p>
		From: <?php echo $contest->getStartDate()?>
		-
		To: <?php echo $contest->getEndDate()?>
	</p>
	<?php if( $contest->isFinished() && ($contest->getStartDate('Y-m-d H:i:s') <= date('Y-m-d H:i:s')) ): ?>
	<ul>
		<li><a class="report" href="<?php echo $this->url(array('action' => 'export-entries'))?>"><?php echo $this->translate('EXPORT_ENTRIES') ?></a></li>
		<li><a class="report" href="<?php echo $this->url(array('action' => 'export-registrants'))?>"><?php echo $this->translate('EXPORT_REGISTRANTS') ?></a></li>
		<li><a class="report" href="<?php echo $this->url(array('action' => 'export-participants'))?>"><?php echo $this->translate('EXPORT_PARTICIPANTS') ?></a></li>
		<li><a class="report" href="<?php echo $this->url(array('action' => 'export-voters'))?>"><?php echo $this->translate('EXPORT_VOTERS') ?></a></li>
	</ul>
	<?php endif;?>
</div>
<?php if( !($contest->isFinished() &&  $contest->getStartDate('Y-m-d H:i:s') <= date('Y-m-d H:i:s') )): ?>
<div class="sm_paginator_item_empty" style="padding-bottom: 24px;">
	<p>The report is not available to export.</p>
</div>
<?php endif;?>
<script>
jQuery("document").ready(function($){
	addTab("<?php echo Core_Util::escapeForJs2($this->contest->getTitle()) ?>", '<?php echo $this->url() ?>');
});
</script>
